package com.myx.juc.simple;

/**
 * 描述: 线程实现方式Runnable
 * @author: myx
 * @date: 2018/11/23
 * Copyright © 2018-hotpot. All rights reserved.
 */
public class RunnableDemo implements Runnable{

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            new Thread(new RunnableDemo()).start();
        }
    }

    @Override
    public void run() {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName()+"我是实现了Runnable的线程");
    }
}
